package com.hnjfzn.mall.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import com.hnjfzn.mall.domain.ProductCategory;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import java.util.Date;

@Mapper
public interface ProductCategoryMapper extends BaseMapper<ProductCategory> {
    // MyBatis-Plus 自动生成常规的增删改查操作
    // 你可以自定义查询 SQL，例如：
    @Select("SELECT * FROM product_category ")
    List<ProductCategory> getAllProductCategories();
    @Update("UPDATE product_category SET category_name = #{categoryName}, parent_category_id = #{parentCategoryId}, create_time = #{createTime}, update_time = #{updateTime}, create_by = #{createBy}, update_by = #{updateBy}, remark = #{remark} WHERE category_id = #{categoryId}")
    int updateById(ProductCategory productCategory);
}
